<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: test_spatial.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d3/dc1/test__spatial_8cpp.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">test_spatial.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Test spatial vector/transform maniuplation functions.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html">Dynamics/SpatialInertia.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="../../d9/dc8/spatial_8h_source.html">Dynamics/spatial.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="../../d4/dfb/orientation__tools_8h_source.html">Math/orientation_tools.h</a>&quot;</code><br />
<code>#include &quot;gmock/gmock.h&quot;</code><br />
<code>#include &quot;gtest/gtest.h&quot;</code><br />
</div><div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Include dependency graph for test_spatial.cpp:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d5/d4f/test__spatial_8cpp__incl.png" border="0" usemap="#test__spatial_8cpp" alt=""/></div>
<map name="test__spatial_8cpp" id="test__spatial_8cpp">
</map>
</div>
</div>
<p><a href="../../d3/dc1/test__spatial_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af1aa40131d8b910903a4fcc89fa4166a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#af1aa40131d8b910903a4fcc89fa4166a">TEST</a> (Spatial, axisRotation)</td></tr>
<tr class="separator:af1aa40131d8b910903a4fcc89fa4166a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa966f31e0dd4ae9297e5325fdc6a8761"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#aa966f31e0dd4ae9297e5325fdc6a8761">TEST</a> (Spatial, crm)</td></tr>
<tr class="separator:aa966f31e0dd4ae9297e5325fdc6a8761"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a577c18b0bce03fb601f6486d3dc580ca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a577c18b0bce03fb601f6486d3dc580ca">TEST</a> (Spatial, crf)</td></tr>
<tr class="separator:a577c18b0bce03fb601f6486d3dc580ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad031204a97d340f99d536b9ae66eca8f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#ad031204a97d340f99d536b9ae66eca8f">TEST</a> (Spatial, crm_prod)</td></tr>
<tr class="separator:ad031204a97d340f99d536b9ae66eca8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a5ecbd0ed30a4c430bbc052900d593f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a9a5ecbd0ed30a4c430bbc052900d593f">TEST</a> (Spatial, crf_prod)</td></tr>
<tr class="separator:a9a5ecbd0ed30a4c430bbc052900d593f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac40b6bfa6adf6dc0d1104fa3c95bc938"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#ac40b6bfa6adf6dc0d1104fa3c95bc938">TEST</a> (Spatial, inertia)</td></tr>
<tr class="separator:ac40b6bfa6adf6dc0d1104fa3c95bc938"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af189c36b9b5cd89cee13d2a2ce44b48e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#af189c36b9b5cd89cee13d2a2ce44b48e">TEST</a> (Spatial, inertia_flips)</td></tr>
<tr class="separator:af189c36b9b5cd89cee13d2a2ce44b48e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3949f366b31ebddfac7c8c792ef472c8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a3949f366b31ebddfac7c8c792ef472c8">TEST</a> (Spatial, pluho_and_plux)</td></tr>
<tr class="separator:a3949f366b31ebddfac7c8c792ef472c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79294cc2a8dce1c212099c54fb55ece1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a79294cc2a8dce1c212099c54fb55ece1">TEST</a> (Spatial, invert_sxform)</td></tr>
<tr class="separator:a79294cc2a8dce1c212099c54fb55ece1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8aab3878bce7ae92c3a4f8a72a7ac0b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#af8aab3878bce7ae92c3a4f8a72a7ac0b">TEST</a> (Spatial, jcalc)</td></tr>
<tr class="separator:af8aab3878bce7ae92c3a4f8a72a7ac0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a43f8f554a83978c5b25bbbc862a573"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a1a43f8f554a83978c5b25bbbc862a573">TEST</a> (Spatial, mass_properties)</td></tr>
<tr class="separator:a1a43f8f554a83978c5b25bbbc862a573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae312978da95cb578735d7961832da61a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#ae312978da95cb578735d7961832da61a">TEST</a> (Spatial, box_inertia)</td></tr>
<tr class="separator:ae312978da95cb578735d7961832da61a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb35714e606b614d0db5063ae839656c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#aeb35714e606b614d0db5063ae839656c">TEST</a> (Spatial, velocityConver)</td></tr>
<tr class="separator:aeb35714e606b614d0db5063ae839656c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb9f5cc98a8c39b15edb7f5b93be9bd2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#adb9f5cc98a8c39b15edb7f5b93be9bd2">TEST</a> (Spatial, pointTransform)</td></tr>
<tr class="separator:adb9f5cc98a8c39b15edb7f5b93be9bd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5eb949150b46e9a1bbc0e32564bf0d21"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a5eb949150b46e9a1bbc0e32564bf0d21">TEST</a> (Spatial, forceToSpatialForce)</td></tr>
<tr class="separator:a5eb949150b46e9a1bbc0e32564bf0d21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39611d6bd5e2e4bbb8170280d3bbd917"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a39611d6bd5e2e4bbb8170280d3bbd917">TEST</a> (Spatial, spatialToLinearVelocity)</td></tr>
<tr class="separator:a39611d6bd5e2e4bbb8170280d3bbd917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f41e482ae0debfa22733ee20c80def"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html#a34f41e482ae0debfa22733ee20c80def">TEST</a> (Spatial, spatialToLinearAcceleration)</td></tr>
<tr class="separator:a34f41e482ae0debfa22733ee20c80def"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Test spatial vector/transform maniuplation functions. </p>
<p>Test the spatial utilities Doesn't test the algorithms. </p>

<p>Definition in file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="af1aa40131d8b910903a4fcc89fa4166a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">axisRotation&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check the spatialRotation function, which generates spatial transforms for coordinate axis rotations </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00021">21</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00028">spatial::spatialRotation()</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::X</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a57cec4137b614c87cb4e24a3d003a3e0">ori::Y</a>, and <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a21c2e59531c8710156d34a3c30ac81d5">ori::Z</a>.</p>
<div class="fragment"><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                            {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <span class="comment">// test X which rotates around an axis</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a217c4c7a22cd434b9700b183b07f1505">SXform&lt;double&gt;</a> X1, X2;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  X1 &lt;&lt; 0.8384, 0.4580, -0.2955, 0, 0, 0, -0.4183, 0.8882, 0.1898, 0, 0, 0,</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;      0.3494, -0.0355, 0.9363, 0, 0, 0, 0, 0, 0, 0.8384, 0.4580, -0.2955, 0, 0,</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;      0, -0.4183, 0.8882, 0.1898, 0, 0, 0, 0.3494, -0.0355, 0.9363;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  X2 = <a class="code" href="../../de/d1a/namespacespatial.html#acab0e3d82f9a5385d482b83f2ee88eb1">spatialRotation</a>(CoordinateAxis::X, .2) *</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;       <a class="code" href="../../de/d1a/namespacespatial.html#acab0e3d82f9a5385d482b83f2ee88eb1">spatialRotation</a>(CoordinateAxis::Y, .3) *</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;       <a class="code" href="../../de/d1a/namespacespatial.html#acab0e3d82f9a5385d482b83f2ee88eb1">spatialRotation</a>(CoordinateAxis::Z, .5);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(X1, X2, .001));</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_a217c4c7a22cd434b9700b183b07f1505"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a217c4c7a22cd434b9700b183b07f1505">SXform</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; SXform</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00066">cppTypes.h:66</a></div></div>
<div class="ttc" id="namespacespatial_html_acab0e3d82f9a5385d482b83f2ee88eb1"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#acab0e3d82f9a5385d482b83f2ee88eb1">spatial::spatialRotation</a></div><div class="ttdeci">SXform&lt; T &gt; spatialRotation(CoordinateAxis axis, T theta)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00028">spatial.h:28</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_af1aa40131d8b910903a4fcc89fa4166a_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_af1aa40131d8b910903a4fcc89fa4166a_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_af1aa40131d8b910903a4fcc89fa4166a_cgraph" id="d3/dc1/test__spatial_8cpp_af1aa40131d8b910903a4fcc89fa4166a_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa966f31e0dd4ae9297e5325fdc6a8761"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">crm&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check the motionCrossMatrix function, which behaves like crm() in MATLAB </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00037">37</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00043">spatial::motionCrossMatrix()</a>.</p>
<div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                   {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="comment">// test motion cross product matrix</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> v1, v2, v3, v4, v5, v6;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  v1 &lt;&lt; 1, 2, 3, 4, 5, 6;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  v2 &lt;&lt; 6, 5, 4, 3, 2, 1;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  v3 = <a class="code" href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">motionCrossMatrix</a>(v1) * v2;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  v4 &lt;&lt; -7, 14, -7, -14, 28, -14;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  v6 = <a class="code" href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">motionCrossMatrix</a>(v1) * v1;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  v5 &lt;&lt; 0, 0, 0, 0, 0, 0;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(v3, v4, .001));</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(v6, v5, .0001));</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="namespacespatial_html_acd5568b97b640537ab22aaf458c73980"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">spatial::motionCrossMatrix</a></div><div class="ttdeci">auto motionCrossMatrix(const Eigen::MatrixBase&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00043">spatial.h:43</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_aa966f31e0dd4ae9297e5325fdc6a8761_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_aa966f31e0dd4ae9297e5325fdc6a8761_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_aa966f31e0dd4ae9297e5325fdc6a8761_cgraph" id="d3/dc1/test__spatial_8cpp_aa966f31e0dd4ae9297e5325fdc6a8761_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a577c18b0bce03fb601f6486d3dc580ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">crf&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check the forceCrossMatrix function, which behaves like crf() in MATLAB Uses crm(-v).transpose() = crf(v) identity </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00054">54</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00060">spatial::forceCrossMatrix()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00043">spatial::motionCrossMatrix()</a>.</p>
<div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                   {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="comment">// test force cross product matrix</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> v1, v2;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  v1 &lt;&lt; 1, 2, 3, 4, 5, 6;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  v2 &lt;&lt; 6, 5, 4, 3, 2, 1;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> m1 = <a class="code" href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">motionCrossMatrix</a>(-v1);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  m1.transposeInPlace();</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> m2 = <a class="code" href="../../de/d1a/namespacespatial.html#a261bcef5a53b2fb64a5c7370420a1275">forceCrossMatrix</a>(v1);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(m1, m2, .0001));</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="namespacespatial_html_acd5568b97b640537ab22aaf458c73980"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">spatial::motionCrossMatrix</a></div><div class="ttdeci">auto motionCrossMatrix(const Eigen::MatrixBase&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00043">spatial.h:43</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespacespatial_html_a261bcef5a53b2fb64a5c7370420a1275"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a261bcef5a53b2fb64a5c7370420a1275">spatial::forceCrossMatrix</a></div><div class="ttdeci">auto forceCrossMatrix(const Eigen::MatrixBase&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00060">spatial.h:60</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a577c18b0bce03fb601f6486d3dc580ca_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a577c18b0bce03fb601f6486d3dc580ca_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a577c18b0bce03fb601f6486d3dc580ca_cgraph" id="d3/dc1/test__spatial_8cpp_a577c18b0bce03fb601f6486d3dc580ca_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ad031204a97d340f99d536b9ae66eca8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">crm_prod&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test motionCrossProduct, a function to compute crm(v1)*v2 with fewer multiplies </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00069">69</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00043">spatial::motionCrossMatrix()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00073">spatial::motionCrossProduct()</a>.</p>
<div class="fragment"><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                        {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="comment">// test motion cross product</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> v1, v2, v3, v4;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  v1 &lt;&lt; 1, 2, 3, 4, 5, 6;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  v2 &lt;&lt; 6, 5, 4, 3, 2, 1;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  v3 = <a class="code" href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">motionCrossMatrix</a>(v1) * v2;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  v4 = <a class="code" href="../../de/d1a/namespacespatial.html#a49f73699d3c57d07835e8ab61af3f34a">motionCrossProduct</a>(v1, v2);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(v3, v4, .0001));</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="namespacespatial_html_acd5568b97b640537ab22aaf458c73980"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#acd5568b97b640537ab22aaf458c73980">spatial::motionCrossMatrix</a></div><div class="ttdeci">auto motionCrossMatrix(const Eigen::MatrixBase&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00043">spatial.h:43</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespacespatial_html_a49f73699d3c57d07835e8ab61af3f34a"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a49f73699d3c57d07835e8ab61af3f34a">spatial::motionCrossProduct</a></div><div class="ttdeci">auto motionCrossProduct(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00073">spatial.h:73</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_ad031204a97d340f99d536b9ae66eca8f_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_ad031204a97d340f99d536b9ae66eca8f_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_ad031204a97d340f99d536b9ae66eca8f_cgraph" id="d3/dc1/test__spatial_8cpp_ad031204a97d340f99d536b9ae66eca8f_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a9a5ecbd0ed30a4c430bbc052900d593f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">crf_prod&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test forceCrossProduct, a function to compute crf(v1)*v2 with fewer multiplies </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00083">83</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00060">spatial::forceCrossMatrix()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00091">spatial::forceCrossProduct()</a>.</p>
<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                        {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="comment">// test force cross product</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> v1, v2, v3, v4;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  v1 &lt;&lt; 1, 2, 3, 4, 5, 6;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  v2 &lt;&lt; 6, 5, 4, 3, 2, 1;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  v3 = <a class="code" href="../../de/d1a/namespacespatial.html#a261bcef5a53b2fb64a5c7370420a1275">forceCrossMatrix</a>(v1) * v2;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  v4 = <a class="code" href="../../de/d1a/namespacespatial.html#a705e44e685fd39dbd6c1a9002ae9a344">forceCrossProduct</a>(v1, v2);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(v3, v4, .0001));</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;}</div><div class="ttc" id="namespacespatial_html_a705e44e685fd39dbd6c1a9002ae9a344"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a705e44e685fd39dbd6c1a9002ae9a344">spatial::forceCrossProduct</a></div><div class="ttdeci">auto forceCrossProduct(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00091">spatial.h:91</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespacespatial_html_a261bcef5a53b2fb64a5c7370420a1275"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a261bcef5a53b2fb64a5c7370420a1275">spatial::forceCrossMatrix</a></div><div class="ttdeci">auto forceCrossMatrix(const Eigen::MatrixBase&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00060">spatial.h:60</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a9a5ecbd0ed30a4c430bbc052900d593f_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a9a5ecbd0ed30a4c430bbc052900d593f_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a9a5ecbd0ed30a4c430bbc052900d593f_cgraph" id="d3/dc1/test__spatial_8cpp_a9a5ecbd0ed30a4c430bbc052900d593f_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ac40b6bfa6adf6dc0d1104fa3c95bc938"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">inertia&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test spatial inertia Checks that it is built correctly from mass, CoM and rotational inertia (like mcI) Also checks the 4x4 Pseudo Inertia </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00098">98</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00118">SpatialInertia&lt; T &gt;::getCOM()</a>, <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00128">SpatialInertia&lt; T &gt;::getInertiaTensor()</a>, <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00113">SpatialInertia&lt; T &gt;::getMass()</a>, <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00104">SpatialInertia&lt; T &gt;::getMatrix()</a>, and <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00142">SpatialInertia&lt; T &gt;::getPseudoInertia()</a>.</p>
<div class="fragment"><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                       {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <span class="comment">// test spatial inertia, mcI, and Pat&#39;s PseudoInertia</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a> I;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  I &lt;&lt; 1, 2, 3, 2, 4, 5, 3, 5, 6;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> com(10, 11, 12);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  <a class="code" href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt;double&gt;</a> IS(42, com, I);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> ref;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a5e48cf69558cf96d92f71803cf9d19a4">Mat4&lt;double&gt;</a> pref;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  pref &lt;&lt; 4204.5, 4618, 5037, 420, 4618, 5083.5, 5539, 462, 5037, 5539, 6047.5,</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      504, 420, 462, 504, 42;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  ref &lt;&lt; 11131, -4618, -5037, 0, -504, 462, -4618, 10252, -5539, 504, 0, -420,</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      -5037, -5539, 9288, -462, 420, 0, 0, 504, -462, 42, 0, 0, -504, 0, 420, 0,</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      42, 0, 462, -420, 0, 0, 0, 42;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <a class="code" href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt;double&gt;</a> IS2(IS.getPseudoInertia());</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(ref, IS.getMatrix(), .001));</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  EXPECT_EQ(42, IS.getMass());</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(I, IS.getInertiaTensor(), .00001));</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(com, IS.getCOM(), .00001));</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(IS.getPseudoInertia(), pref, .1));</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(IS.getMatrix(), IS2.getMatrix(), .00001));</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="cpp_types_8h_html_aa8cb424e643d476ea485238dad7c3e18"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; Mat3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00054">cppTypes.h:54</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a5e48cf69558cf96d92f71803cf9d19a4"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a5e48cf69558cf96d92f71803cf9d19a4">Mat4</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 4, 4 &gt; Mat4</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00094">cppTypes.h:94</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="class_spatial_inertia_html"><div class="ttname"><a href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt; double &gt;</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-6" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-6-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_ac40b6bfa6adf6dc0d1104fa3c95bc938_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_ac40b6bfa6adf6dc0d1104fa3c95bc938_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_ac40b6bfa6adf6dc0d1104fa3c95bc938_cgraph" id="d3/dc1/test__spatial_8cpp_ac40b6bfa6adf6dc0d1104fa3c95bc938_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af189c36b9b5cd89cee13d2a2ce44b48e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">inertia_flips&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check the flipAlongAxis method of spatial inertias </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00126">126</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a57cec4137b614c87cb4e24a3d003a3e0">ori::Y</a>.</p>
<div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                             {</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <span class="comment">// test flipping inertias around axes</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ad7673cd2189f78a761c3a51d9c1314b1">MassProperties&lt;double&gt;</a> a, aref;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  a &lt;&lt; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  aref &lt;&lt; 1, 2, -3, 4, 5, 6, 7, -8, 9, -10;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;      <a class="code" href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt;double&gt;</a>(aref).getMatrix(),</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;      <a class="code" href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt;double&gt;</a>(a).flipAlongAxis(CoordinateAxis::Y).getMatrix(),</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;      .0001));</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div><div class="ttc" id="class_spatial_inertia_html"><div class="ttname"><a href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt; double &gt;</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ad7673cd2189f78a761c3a51d9c1314b1"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ad7673cd2189f78a761c3a51d9c1314b1">MassProperties</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 10, 1 &gt; MassProperties</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00098">cppTypes.h:98</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-7" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-7-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_af189c36b9b5cd89cee13d2a2ce44b48e_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_af189c36b9b5cd89cee13d2a2ce44b48e_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_af189c36b9b5cd89cee13d2a2ce44b48e_cgraph" id="d3/dc1/test__spatial_8cpp_af189c36b9b5cd89cee13d2a2ce44b48e_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a3949f366b31ebddfac7c8c792ef472c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pluho_and_plux&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check the homogeneous transformation (pluho) Also check the spatial transformation functions (plux) </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00141">141</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d4/dfb/orientation__tools_8h_source.html#l00060">ori::coordinateRotation()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00140">spatial::createSXform()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00124">spatial::homogeneousToSXform()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00157">spatial::rotationFromSXform()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00108">spatial::sxformToHomogeneous()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00168">spatial::translationFromSXform()</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::X</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a57cec4137b614c87cb4e24a3d003a3e0">ori::Y</a>, and <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a21c2e59531c8710156d34a3c30ac81d5">ori::Z</a>.</p>
<div class="fragment"><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;                              {</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="comment">// test homogeneous transformations and spatial transformations</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a0b83d93a3c74d282558436e26c056896">RotMat&lt;double&gt;</a> R = <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::X, 1.0) *</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                     <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::Y, 2.0) *</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                     <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::Z, 3.0);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> r(4, 5, 6);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> <a class="code" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">X</a> = <a class="code" href="../../de/d1a/namespacespatial.html#ae4a2145f3028087511b4f17c0152ec83">createSXform</a>(R, r);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> Xref, X2;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a5e48cf69558cf96d92f71803cf9d19a4">Mat4&lt;double&gt;</a> H = <a class="code" href="../../de/d1a/namespacespatial.html#a30b33586f68f1f6b31718848914a90ca">sxformToHomogeneous</a>(X);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a5e48cf69558cf96d92f71803cf9d19a4">Mat4&lt;double&gt;</a> Href;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  X2 = <a class="code" href="../../de/d1a/namespacespatial.html#a39cbc59fb7656b397d13c5a52799bf22">homogeneousToSXform</a>(H);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  Xref &lt;&lt; 0.4120, -0.0587, -0.9093, 0, 0, 0, -0.8337, -0.4269, -0.3502, 0, 0, 0,</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;      -0.3676, 0.9024, -0.2248, 0, 0, 0, -4.1941, 6.1091, -2.2948, 0.4120,</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;      -0.0587, -0.9093, 0.8106, -3.6017, 2.4610, -0.8337, -0.4269, -0.3502,</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;      -6.5385, -1.3064, 5.4477, -0.3676, 0.9024, -0.2248;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  Href &lt;&lt; 0.4120, -0.0587, -0.9093, 4.1015, -0.8337, -0.4269, -0.3502, 7.5706,</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      -0.3676, 0.9024, -0.2248, -1.6923, 0, 0, 0, 1.0000;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(Xref, X, .001));</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(R, <a class="code" href="../../de/d1a/namespacespatial.html#abdc3cd991206414d80d9f89be27e3633">rotationFromSXform</a>(X), .001));</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(r, <a class="code" href="../../de/d1a/namespacespatial.html#aba5e712bd3844d2e6a57dcb071f3f0a5">translationFromSXform</a>(X), .001));</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(H, Href, .001));</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(X, X2, .00001));</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;}</div><div class="ttc" id="namespaceori_html_a537b8d0769c03e4cd8ef2b9a9dc8a760"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">ori::coordinateRotation</a></div><div class="ttdeci">Mat3&lt; T &gt; coordinateRotation(CoordinateAxis axis, T theta)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00060">orientation_tools.h:60</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a5e48cf69558cf96d92f71803cf9d19a4"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a5e48cf69558cf96d92f71803cf9d19a4">Mat4</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 4, 4 &gt; Mat4</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00094">cppTypes.h:94</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="namespacespatial_html_aba5e712bd3844d2e6a57dcb071f3f0a5"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#aba5e712bd3844d2e6a57dcb071f3f0a5">spatial::translationFromSXform</a></div><div class="ttdeci">auto translationFromSXform(const Eigen::MatrixBase&lt; T &gt; &amp;X)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00168">spatial.h:168</a></div></div>
<div class="ttc" id="namespacespatial_html_ae4a2145f3028087511b4f17c0152ec83"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#ae4a2145f3028087511b4f17c0152ec83">spatial::createSXform</a></div><div class="ttdeci">auto createSXform(const Eigen::MatrixBase&lt; T &gt; &amp;R, const Eigen::MatrixBase&lt; T2 &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00140">spatial.h:140</a></div></div>
<div class="ttc" id="namespacespatial_html_a30b33586f68f1f6b31718848914a90ca"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a30b33586f68f1f6b31718848914a90ca">spatial::sxformToHomogeneous</a></div><div class="ttdeci">auto sxformToHomogeneous(const Eigen::MatrixBase&lt; T &gt; &amp;X)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00108">spatial.h:108</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespacespatial_html_a39cbc59fb7656b397d13c5a52799bf22"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a39cbc59fb7656b397d13c5a52799bf22">spatial::homogeneousToSXform</a></div><div class="ttdeci">auto homogeneousToSXform(const Eigen::MatrixBase&lt; T &gt; &amp;H)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00124">spatial.h:124</a></div></div>
<div class="ttc" id="namespaceori_html_a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::CoordinateAxis::X</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a0b83d93a3c74d282558436e26c056896"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a0b83d93a3c74d282558436e26c056896">RotMat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; RotMat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00018">cppTypes.h:18</a></div></div>
<div class="ttc" id="namespacespatial_html_abdc3cd991206414d80d9f89be27e3633"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#abdc3cd991206414d80d9f89be27e3633">spatial::rotationFromSXform</a></div><div class="ttdeci">auto rotationFromSXform(const Eigen::MatrixBase&lt; T &gt; &amp;X)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00157">spatial.h:157</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-8" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-8-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-8-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-8-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a3949f366b31ebddfac7c8c792ef472c8_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a3949f366b31ebddfac7c8c792ef472c8_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a3949f366b31ebddfac7c8c792ef472c8_cgraph" id="d3/dc1/test__spatial_8cpp_a3949f366b31ebddfac7c8c792ef472c8_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a79294cc2a8dce1c212099c54fb55ece1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">invert_sxform&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check invertSXform, which computes inverse(X) quickly if X is a plucker coordinate transform </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00169">169</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d4/dfb/orientation__tools_8h_source.html#l00060">ori::coordinateRotation()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00140">spatial::createSXform()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00181">spatial::invertSXform()</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::X</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a57cec4137b614c87cb4e24a3d003a3e0">ori::Y</a>, and <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a21c2e59531c8710156d34a3c30ac81d5">ori::Z</a>.</p>
<div class="fragment"><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                             {</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a0b83d93a3c74d282558436e26c056896">RotMat&lt;double&gt;</a> R = <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::X, 1.0) *</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                     <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::Y, 2.0) *</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                     <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::Z, 3.0);</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> r(4, 5, 6);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> <a class="code" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">X</a> = <a class="code" href="../../de/d1a/namespacespatial.html#ae4a2145f3028087511b4f17c0152ec83">createSXform</a>(R, r);</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> Xi_ref = X.inverse();</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> Xi = <a class="code" href="../../de/d1a/namespacespatial.html#af37757ee8ad4510df5478202a62c9502">invertSXform</a>(X);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(Xi_ref, Xi, .00001));</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;}</div><div class="ttc" id="namespaceori_html_a537b8d0769c03e4cd8ef2b9a9dc8a760"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">ori::coordinateRotation</a></div><div class="ttdeci">Mat3&lt; T &gt; coordinateRotation(CoordinateAxis axis, T theta)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00060">orientation_tools.h:60</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="namespacespatial_html_ae4a2145f3028087511b4f17c0152ec83"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#ae4a2145f3028087511b4f17c0152ec83">spatial::createSXform</a></div><div class="ttdeci">auto createSXform(const Eigen::MatrixBase&lt; T &gt; &amp;R, const Eigen::MatrixBase&lt; T2 &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00140">spatial.h:140</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespaceori_html_a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::CoordinateAxis::X</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a0b83d93a3c74d282558436e26c056896"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a0b83d93a3c74d282558436e26c056896">RotMat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; RotMat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00018">cppTypes.h:18</a></div></div>
<div class="ttc" id="namespacespatial_html_af37757ee8ad4510df5478202a62c9502"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#af37757ee8ad4510df5478202a62c9502">spatial::invertSXform</a></div><div class="ttdeci">auto invertSXform(const Eigen::MatrixBase&lt; T &gt; &amp;X)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00181">spatial.h:181</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-9" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-9-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-9-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-9-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a79294cc2a8dce1c212099c54fb55ece1_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a79294cc2a8dce1c212099c54fb55ece1_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a79294cc2a8dce1c212099c54fb55ece1_cgraph" id="d3/dc1/test__spatial_8cpp_a79294cc2a8dce1c212099c54fb55ece1_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af8aab3878bce7ae92c3a4f8a72a7ac0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">jcalc&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test the jointXform and jointMotionSubspace functions, which are similar to jcalc </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00184">184</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00219">spatial::jointXform()</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a57cec4137b614c87cb4e24a3d003a3e0">ori::Y</a>, and <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a21c2e59531c8710156d34a3c30ac81d5">ori::Z</a>.</p>
<div class="fragment"><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                     {</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> Xr, Xp, Xr_ref, Xp_ref;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> phi_r, phi_p, phi_r_ref, phi_p_ref;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  Xr = <a class="code" href="../../de/d1a/namespacespatial.html#a6440807f3b1854b1708f49048331811a">jointXform</a>(JointType::Revolute, CoordinateAxis::Y, std::asin(.707));</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  Xp = <a class="code" href="../../de/d1a/namespacespatial.html#a6440807f3b1854b1708f49048331811a">jointXform</a>(JointType::Prismatic, CoordinateAxis::Z, .2);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  phi_r = jointMotionSubspace&lt;double&gt;(JointType::Revolute, CoordinateAxis::Y);</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  phi_p = jointMotionSubspace&lt;double&gt;(JointType::Prismatic, CoordinateAxis::Z);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  Xr_ref &lt;&lt; 0.7072, 0, -0.7070, 0, 0, 0, 0, 1.0000, 0, 0, 0, 0, 0.7070, 0,</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;      0.7072, 0, 0, 0, 0, 0, 0, 0.7072, 0, -0.7070, 0, 0, 0, 0, 1.0000, 0, 0, 0,</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;      0, 0.7070, 0, 0.7072;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  phi_r_ref &lt;&lt; 0, 1, 0, 0, 0, 0;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  Xp_ref &lt;&lt; 1.0000, 0, 0, 0, 0, 0, 0, 1.0000, 0, 0, 0, 0, 0, 0, 1.0000, 0, 0, 0,</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;      0, 0.2000, 0, 1.0000, 0, 0, -0.2000, 0, 0, 0, 1.0000, 0, 0, 0, 0, 0, 0,</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;      1.0000;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  phi_p_ref &lt;&lt; 0, 0, 0, 0, 0, 1;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(Xr, Xr_ref, .001));</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(Xp, Xp_ref, .001));</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(phi_r, phi_r_ref, .000001));</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(phi_p, phi_p_ref, .000001));</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="namespacespatial_html_a6440807f3b1854b1708f49048331811a"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a6440807f3b1854b1708f49048331811a">spatial::jointXform</a></div><div class="ttdeci">Mat6&lt; T &gt; jointXform(JointType joint, CoordinateAxis axis, T q)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00219">spatial.h:219</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-10" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-10-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-10-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-10-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_af8aab3878bce7ae92c3a4f8a72a7ac0b_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_af8aab3878bce7ae92c3a4f8a72a7ac0b_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_af8aab3878bce7ae92c3a4f8a72a7ac0b_cgraph" id="d3/dc1/test__spatial_8cpp_af8aab3878bce7ae92c3a4f8a72a7ac0b_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a1a43f8f554a83978c5b25bbbc862a573"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mass_properties&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test functions for converting between spatial inertias and the minimal representation "mass property vector", which contains 10 elements. </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00215">215</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00093">SpatialInertia&lt; T &gt;::asMassPropertyVector()</a>, and <a class="el" href="../../d4/d7d/_spatial_inertia_8h_source.html#l00104">SpatialInertia&lt; T &gt;::getMatrix()</a>.</p>
<div class="fragment"><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                               {</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ad7673cd2189f78a761c3a51d9c1314b1">MassProperties&lt;double&gt;</a> a;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  a &lt;&lt; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> I, I_ref;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  I_ref &lt;&lt; 5, 10, 9, 0, -4, 3, 10, 6, 8, 4, 0, -2, 9, 8, 7, -3, 2, 0, 0, 4, -3,</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;      1, 0, 0, -4, 0, 2, 0, 1, 0, 3, -2, 0, 0, 0, 1;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;  <a class="code" href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt;double&gt;</a> IS(a);</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(I_ref, IS.getMatrix(), .001));</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(a, IS.asMassPropertyVector(), .001));</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="class_spatial_inertia_html"><div class="ttname"><a href="../../d6/d81/class_spatial_inertia.html">SpatialInertia&lt; double &gt;</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ad7673cd2189f78a761c3a51d9c1314b1"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ad7673cd2189f78a761c3a51d9c1314b1">MassProperties</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 10, 1 &gt; MassProperties</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00098">cppTypes.h:98</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-11" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-11-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-11-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-11-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a1a43f8f554a83978c5b25bbbc862a573_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a1a43f8f554a83978c5b25bbbc862a573_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a1a43f8f554a83978c5b25bbbc862a573_cgraph" id="d3/dc1/test__spatial_8cpp_a1a43f8f554a83978c5b25bbbc862a573_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae312978da95cb578735d7961832da61a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">box_inertia&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test utility function for computing the inertia of a uniform rectangular box </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00229">229</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00245">spatial::rotInertiaOfBox()</a>.</p>
<div class="fragment"><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                           {</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <span class="comment">// test inertia of uniformly distributed box</span></div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a> I_ref;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  I_ref &lt;&lt; 2.0833, 0, 0, 0, 1.66667, 0, 0, 0, 1.083333;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a> I_calc = <a class="code" href="../../de/d1a/namespacespatial.html#aa7ac11b744e5fad0c1cbef41e3bb209f">rotInertiaOfBox</a>(1., <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a>(2, 3, 4));</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(I_ref, I_calc, .001));</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_aa8cb424e643d476ea485238dad7c3e18"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; Mat3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00054">cppTypes.h:54</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespacespatial_html_aa7ac11b744e5fad0c1cbef41e3bb209f"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#aa7ac11b744e5fad0c1cbef41e3bb209f">spatial::rotInertiaOfBox</a></div><div class="ttdeci">Mat3&lt; typename T::Scalar &gt; rotInertiaOfBox(typename T::Scalar mass, const Eigen::MatrixBase&lt; T &gt; &amp;dims)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00245">spatial.h:245</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-12" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-12-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-12-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-12-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_ae312978da95cb578735d7961832da61a_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_ae312978da95cb578735d7961832da61a_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_ae312978da95cb578735d7961832da61a_cgraph" id="d3/dc1/test__spatial_8cpp_ae312978da95cb578735d7961832da61a_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aeb35714e606b614d0db5063ae839656c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">velocityConver&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test utility function for converting spatial velocity to linear velocity at a point </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00241">241</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00261">spatial::spatialToLinearVelocity()</a>.</p>
<div class="fragment"><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                              {</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> vRef(-2, 17, 0);</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> vs;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  vs &lt;&lt; 1, 2, 3, 4, 5, 6;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> p(7, 8, 9);</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> v = <a class="code" href="../../de/d1a/namespacespatial.html#a95b2db654a989f56df5a8977a5be12d6">spatialToLinearVelocity</a>(vs, p);</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(v, vRef, .00001));</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;}</div><div class="ttc" id="namespacespatial_html_a95b2db654a989f56df5a8977a5be12d6"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a95b2db654a989f56df5a8977a5be12d6">spatial::spatialToLinearVelocity</a></div><div class="ttdeci">auto spatialToLinearVelocity(const Eigen::MatrixBase&lt; T &gt; &amp;v, const Eigen::MatrixBase&lt; T2 &gt; &amp;x)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00261">spatial.h:261</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-13" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-13-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-13-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-13-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_aeb35714e606b614d0db5063ae839656c_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_aeb35714e606b614d0db5063ae839656c_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_aeb35714e606b614d0db5063ae839656c_cgraph" id="d3/dc1/test__spatial_8cpp_aeb35714e606b614d0db5063ae839656c_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="adb9f5cc98a8c39b15edb7f5b93be9bd2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pointTransform&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test utility function for transforming a point by a spatial transform </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00253">253</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, <a class="el" href="../../d4/dfb/orientation__tools_8h_source.html#l00060">ori::coordinateRotation()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00140">spatial::createSXform()</a>, <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00329">spatial::sXFormPoint()</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::X</a>, <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a57cec4137b614c87cb4e24a3d003a3e0">ori::Y</a>, and <a class="el" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a21c2e59531c8710156d34a3c30ac81d5">ori::Z</a>.</p>
<div class="fragment"><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                              {</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> p0(1, 2, 3);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> pxRef(-3.0026, -1.9791, -3.7507);</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a> R = <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::X, .2) *</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                   <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::Y, .3) *</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                   <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">coordinateRotation</a>(CoordinateAxis::Z, .5);</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> r(4, 5, 6);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;double&gt;</a> <a class="code" href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">X</a> = <a class="code" href="../../de/d1a/namespacespatial.html#ae4a2145f3028087511b4f17c0152ec83">createSXform</a>(R, r);</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> px = <a class="code" href="../../de/d1a/namespacespatial.html#ab521121fc7af2392144a78003c100a10">sXFormPoint</a>(X, p0);</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(px, pxRef, .0005));</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;}</div><div class="ttc" id="namespaceori_html_a537b8d0769c03e4cd8ef2b9a9dc8a760"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">ori::coordinateRotation</a></div><div class="ttdeci">Mat3&lt; T &gt; coordinateRotation(CoordinateAxis axis, T theta)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00060">orientation_tools.h:60</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="cpp_types_8h_html_aa8cb424e643d476ea485238dad7c3e18"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; Mat3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00054">cppTypes.h:54</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="namespacespatial_html_ab521121fc7af2392144a78003c100a10"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#ab521121fc7af2392144a78003c100a10">spatial::sXFormPoint</a></div><div class="ttdeci">auto sXFormPoint(const Eigen::MatrixBase&lt; T &gt; &amp;X, const Eigen::MatrixBase&lt; T2 &gt; &amp;p)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00329">spatial.h:329</a></div></div>
<div class="ttc" id="namespacespatial_html_ae4a2145f3028087511b4f17c0152ec83"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#ae4a2145f3028087511b4f17c0152ec83">spatial::createSXform</a></div><div class="ttdeci">auto createSXform(const Eigen::MatrixBase&lt; T &gt; &amp;R, const Eigen::MatrixBase&lt; T2 &gt; &amp;r)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00140">spatial.h:140</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
<div class="ttc" id="namespaceori_html_a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a02c20a1b1d35988c657aa1e219d609d5a02129bb861061d1a052c592e2dc6b383">ori::CoordinateAxis::X</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-14" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-14-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-14-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-14-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_adb9f5cc98a8c39b15edb7f5b93be9bd2_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_adb9f5cc98a8c39b15edb7f5b93be9bd2_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_adb9f5cc98a8c39b15edb7f5b93be9bd2_cgraph" id="d3/dc1/test__spatial_8cpp_adb9f5cc98a8c39b15edb7f5b93be9bd2_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a5eb949150b46e9a1bbc0e32564bf0d21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">forceToSpatialForce&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test utility function for converting force at a point to a spatial force </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00270">270</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00348">spatial::forceToSpatialForce()</a>.</p>
<div class="fragment"><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                                   {</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> fLinear(1, 2, 3);</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> point(7, 8, 9);</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> fRef;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  fRef &lt;&lt; 6, -12, 6, 1, 2, 3;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> fSpatial = <a class="code" href="../../de/d1a/namespacespatial.html#a3b32f3f809891285d9f1a8cf3c7cd16e">forceToSpatialForce</a>(fLinear, point);</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(fSpatial, fRef, .0005));</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;}</div><div class="ttc" id="namespacespatial_html_a3b32f3f809891285d9f1a8cf3c7cd16e"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a3b32f3f809891285d9f1a8cf3c7cd16e">spatial::forceToSpatialForce</a></div><div class="ttdeci">auto forceToSpatialForce(const Eigen::MatrixBase&lt; T &gt; &amp;f, const Eigen::MatrixBase&lt; T2 &gt; &amp;p)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00348">spatial.h:348</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-15" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-15-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-15-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-15-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a5eb949150b46e9a1bbc0e32564bf0d21_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a5eb949150b46e9a1bbc0e32564bf0d21_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a5eb949150b46e9a1bbc0e32564bf0d21_cgraph" id="d3/dc1/test__spatial_8cpp_a5eb949150b46e9a1bbc0e32564bf0d21_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a39611d6bd5e2e4bbb8170280d3bbd917"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spatialToLinearVelocity&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test utility function for converting the spatial velocity to the velocity at a point </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00283">283</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00261">spatial::spatialToLinearVelocity()</a>.</p>
<div class="fragment"><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;                                       {</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> vspat;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  vspat &lt;&lt; 1.93, 2.34, 3.345, -4.23, 5.8383, 6.921;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> vlin = vspat.tail(3);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> vang = vspat.head(3);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> point;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  point &lt;&lt; -23.23, 2.638, 9.324;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> vpoint = vlin + vang.cross(point);</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> vpoint2 = <a class="code" href="../../de/d1a/namespacespatial.html#a95b2db654a989f56df5a8977a5be12d6">spatialToLinearVelocity</a>(vspat, point);</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(vpoint2, vpoint, 1e-8));</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;}</div><div class="ttc" id="namespacespatial_html_a95b2db654a989f56df5a8977a5be12d6"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a95b2db654a989f56df5a8977a5be12d6">spatial::spatialToLinearVelocity</a></div><div class="ttdeci">auto spatialToLinearVelocity(const Eigen::MatrixBase&lt; T &gt; &amp;v, const Eigen::MatrixBase&lt; T2 &gt; &amp;x)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00261">spatial.h:261</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-16" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-16-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-16-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-16-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a39611d6bd5e2e4bbb8170280d3bbd917_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a39611d6bd5e2e4bbb8170280d3bbd917_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a39611d6bd5e2e4bbb8170280d3bbd917_cgraph" id="d3/dc1/test__spatial_8cpp_a39611d6bd5e2e4bbb8170280d3bbd917_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a34f41e482ae0debfa22733ee20c80def"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">Spatial&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">spatialToLinearAcceleration&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Test utility function for converting the spatial acceleration to the linear acceleration of a point </p>

<p>Definition at line <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html#l00301">301</a> of file <a class="el" href="../../d3/dc1/test__spatial_8cpp_source.html">test_spatial.cpp</a>.</p>

<p>References <a class="el" href="../../de/dda/_math_utilities_8h_source.html#l00023">almostEqual()</a>, and <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00289">spatial::spatialToLinearAcceleration()</a>.</p>
<div class="fragment"><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;                                           {</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;double&gt;</a> vspat, aspat;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;  <span class="comment">// Top spinning with angular velocity w on a skateboard that is traveling at</span></div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  <span class="comment">// velocity v and is currently at point p</span></div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;  <span class="keywordtype">double</span> w = 5;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;  <span class="keywordtype">double</span> v = 1;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="keywordtype">double</span> p = 1;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;  vspat &lt;&lt; 0, 0, w, v, -w * p, 0;</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  aspat &lt;&lt; 0, 0, 0, 0, -w * v, 0;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> p2;</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;  p2 &lt;&lt; p, 0, 0;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> a1 = <a class="code" href="../../de/d1a/namespacespatial.html#a13df9ec1359ecd4150251eaae0895198">spatialToLinearAcceleration</a>(aspat, vspat);</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> a2 = <a class="code" href="../../de/d1a/namespacespatial.html#a13df9ec1359ecd4150251eaae0895198">spatialToLinearAcceleration</a>(aspat, vspat, p2);</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> a1_expected, a2_expected;</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;  a1_expected &lt;&lt; w * w * p, 0, 0;</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  a2_expected &lt;&lt; 0, 0, 0;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(a1, a1_expected, 1e-8));</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(a2, a2_expected, 1e-8));</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;  vspat &lt;&lt; 1.93, 2.34, 3.345, -4.23, 5.8383, 6.921;</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;  aspat &lt;&lt; -5.164, 68.4, 1.56879, -98.44, 8.14, 6.324;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;  p2 &lt;&lt; 54.797, -6.1654, 3.64587;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> w1, v1, wd1, vd1;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> w2, v2, wd2, vd2;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;  w1 = vspat.head(3);</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;  v1 = vspat.tail(3);</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;  wd1 = aspat.head(3);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;  vd1 = aspat.tail(3);</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;  w2 = w1;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  wd2 = w2;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;  v2 = v1 + w1.cross(p2);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  vd2 = vd1 + wd1.cross(p2);</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;  a1_expected = vd1 + w1.cross(v1);</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  a2_expected = vd2 + w2.cross(v2);</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  a1 = <a class="code" href="../../de/d1a/namespacespatial.html#a13df9ec1359ecd4150251eaae0895198">spatialToLinearAcceleration</a>(aspat, vspat);</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  a2 = <a class="code" href="../../de/d1a/namespacespatial.html#a13df9ec1359ecd4150251eaae0895198">spatialToLinearAcceleration</a>(aspat, vspat, p2);</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(a1, a1_expected, 1e-8));</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;  EXPECT_TRUE(<a class="code" href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a>(a2, a2_expected, 1e-8));</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="namespacespatial_html_a13df9ec1359ecd4150251eaae0895198"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a13df9ec1359ecd4150251eaae0895198">spatial::spatialToLinearAcceleration</a></div><div class="ttdeci">auto spatialToLinearAcceleration(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T2 &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00289">spatial.h:289</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_math_utilities_8h_html_aa06ec79f1e3170ea41b58ffbf35b9fb6"><div class="ttname"><a href="../../de/dda/_math_utilities_8h.html#aa06ec79f1e3170ea41b58ffbf35b9fb6">almostEqual</a></div><div class="ttdeci">bool almostEqual(const Eigen::MatrixBase&lt; T &gt; &amp;a, const Eigen::MatrixBase&lt; T &gt; &amp;b, T2 tol)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dda/_math_utilities_8h_source.html#l00023">MathUtilities.h:23</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-17" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-17-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-17-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-17-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d3/dc1/test__spatial_8cpp_a34f41e482ae0debfa22733ee20c80def_cgraph.png" border="0" usemap="#d3/dc1/test__spatial_8cpp_a34f41e482ae0debfa22733ee20c80def_cgraph" alt=""/></div>
<map name="d3/dc1/test__spatial_8cpp_a34f41e482ae0debfa22733ee20c80def_cgraph" id="d3/dc1/test__spatial_8cpp_a34f41e482ae0debfa22733ee20c80def_cgraph">
</map>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_860379c26524a894b3cf97b5b1ba5bdb.html">common</a></li><li class="navelem"><a class="el" href="../../dir_bcd721272d4e8dced7bf80a08d191b42.html">test</a></li><li class="navelem"><a class="el" href="../../d3/dc1/test__spatial_8cpp.html">test_spatial.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
